#include "../../gui_io.h"
#include "../../xml.h"

int elog_gui_io_lock();
//Tells if the program is currently trying to open a file and display it.
//This basically exists to make sure callbacks don't interfere with quick
//displaying!


void edit_gui_previewPane_set(struct dict *meta);
//Pre:  fileName is a valid file link
//Post:  creates a new preview pane, can be included using sidePan, and will 
//		contain info about the file contents.

void edit_gui_io_addLink(struct dict *lnk);
//Pre: lnk must be a valid link
//Post:  adds it to the list for the current file, so it can be saved.
		//Do not free the inputed lnk, it is not copied.

int elog_gui_io_checkRange(int loc, struct dict **lnk);
//Pre:
//POst: Checks if the current loc has a tag there, returns 0 for no tag
//1 for a tag

void edit_gui_io_updateTags(int start, int len);
//Pre:
//Post: Moves links, so they are saved in the correct positions!


void elog_gui_io_removeLink(int loc);
//Pre: loc must be a spot within a valid link
//Post:  Link will be removed from ui and from app storage.


struct elog_xml_doc *elog_gui_getMeta();
//Pre:  box is a valid created struct
//Post:  returns the meta data from it using the information in the side pane.

int edit_gui_io_save();
//Pre:  Something is open;
//Post:  Saves to the disk and returns 0 on success!

